﻿using System;

namespace AppleEvent
{
    class Program
    {
        static void Main(string[] args)
        {
            Apple apple = new Apple()
            {
                price = 5000
            };
            //下边可以使用快捷键.
            apple.dePrice += muchBuy;

            apple.price = 8000;
            apple.price = 2000;


        }

        private static void muchBuy(object sender, MyEventArgs e)
        {
            Console.WriteLine($"原来卖{e.Oldprice}现在卖{e.Price}");
            Console.WriteLine("赶快来买吧");
        }
    }
}
